IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[UpdateDepartamento]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[UpdateDepartamento]
GO

CREATE PROCEDURE [dbo].[UpdateDepartamento]
(
	@IdDepartamento int,
	@Nombre varchar(150),
	@Estado bit
)
AS
BEGIN
	SET NOCOUNT ON

	UPDATE [Departamento]
	SET [Nombre] = @Nombre, 
		[Estado] = @Estado
	WHERE [IdDepartamento] = @IdDepartamento

	SET NOCOUNT OFF
END

GO
